package com.itheima.reggie.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.itheima.reggie.common.LocalDateTimeConverter;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 员工实体
 */
@Data
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty(value = "员工ID")
    private Long id;

    @ExcelProperty(value = "员工账号")
    private String username;

    @ExcelProperty(value = "员工姓名")
    private String name;

    @ExcelIgnore
    private String password;

    @ExcelProperty(value = "员工手机号码")
    private String phone;

    @ExcelProperty(value = "员工性别")
    private String sex;

    @ExcelProperty(value = "员工身份证号")
    private String idNumber;//身份证号码

    @ExcelProperty(value = "员工状态")
    private Integer status;

    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty(value = "创建时间",converter = LocalDateTimeConverter.class)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "更新时间",converter = LocalDateTimeConverter.class)
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty(value = "创建人")
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "更新人")
    private Long updateUser;

}
